#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import commands

class log_parser:
    # log_file_0="/blackbox/sdrs_log/ap_log/AP"
    # log_file_1="00"
    # log_file_2=".log"
    # log_file="123"

    def __init__(self):
        print "__init__"
        self.log_file_0="/blackbox/sdrs_log/ap_log/AP"
        self.log_file_1="00"
        self.log_file_2=".log"
        self.log_file="123"

    def find_the_newest_file(self):
        self.log_file_1 = commands.getoutput("cat latest")
        # print self.log_file_1
        self.log_file=self.log_file_0 + self.log_file_1 + self.log_file_2
        print self.log_file

    def __find_the_start__(self):

    def parse_log_file(self):
        print "new newest file name is hhhh"


if __name__=="__main__":
    print "main\n"
    # os.system("ls")
    cp_lost_packs=log_parser()
    cp_lost_packs.find_the_newest_file()

    print cp_lost_packs.log_file
    cp_lost_packs.parse_log_file()
